package com.dj.service;

import com.dj.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

//注解里面的value值可以省略不写，
//默认值是类名称，首字母小写
//UserService——userService
@Service //<bean id="userService" class="...">
public class UserService {

    @Autowired
    @Qualifier("userMapperImpl1")
    private UserMapper userMapper;

    public void login(){
        userMapper.check();
        System.out.println("UserService 验证登录");
    }
}
